/**
 * 订单详情-详情
 * Created by wzj on 2017/4/10.
 */

function JBSFrame_purchase_detail(){

	JBSFrame.call(this);

	this.detailTimeline = null;
	//初始化UI
	this.initUI = function(){

		//
		//详情-订单记录
		this.detailTimeline = ReactDOM.render(<TimeLine title="订单记录"  left="买方" leftColor="blue" right="卖方" rightColor="orange"/>,document.getElementById("detail-timeline"));

		//加载详情数据
		this.load_data_detail();
	}

	//加载详情数据
	this.load_data_detail = function(){
		/*
		$.ajax({
			 url:"",
			 success:function(str,msg,response){
				 if(response.statusText=="success"){
				 	var result = JSON.parse(response.responseText);
					//填充详情数据
				 	this.fill_data_detail(result);
				 }
			 }.bind(this),
			 error:function(str,msg,response){

			 }.bind(this)
		})
		*/
		this.fill_data_detail()
	}

	//填充详情数据
	this.fill_data_detail = function(data){
		//
		//....................

		//填充订单记录
		this.fill_data_detail();
	}
	//填充订单记录
	this.fill_data_detail = function(data){
		this.detailTimeline.setState({
			datas: [
				{target:"买方",event:"下单",datetime:"2017-03-27 13:49:00"},
				{target:"卖方",event:"上传双签合同",datetime:"2017-03-27 17:49:00"},
				{target:"买方",event:"上传双签合同",datetime:"2017-03-27 17:49:00"},
				{target:"买方",event:"校对合同",datetime:"2017-03-27 17:49:00"},
				{target:"卖方",event:"校对合同",datetime:"2017-03-27 17:49:00"},
				{target:"买方",event:"付首款",datetime:"2017-03-27 13:49:00"},
				{target:"卖方",event:"上传放货单",datetime:"2017-03-27 13:49:00"},
				{target:"买方",event:"校对放货单",datetime:"2017-03-27 13:49:00"},
				{target:"买方",event:"已提货",datetime:"2017-03-27 13:49:00"},
				{target:"卖方",event:"上传放货单",datetime:"2017-03-27 13:49:00"},
				{target:"买方",event:"校对结算单",datetime:"2017-03-27 13:49:00"},
				{target:"卖方",event:"付尾款",datetime:"2017-03-27 13:49:00"},
				{target:"买方",event:"付尾款",datetime:"2017-03-27 13:49:00"}

			]
		});
	}
}



/*
 //body load
 --------------------------------------------------------------------*/
var esteel_purchase_detail;
$(document).ready(function(e) {
	esteel_purchase_detail = new JBSFrame_purchase_detail();
	//初始化UI
	esteel_purchase_detail.initUI()
});
